<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
	body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
	</style>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=DD279b2a90afdf0ae7a3796787a0742e"></script>
	<title>地图展示</title>
</head>
<body>
	<form action="/wether.do" method="get">
		<input type="text" name="name" id="" value="" class="form-control" placeholder="请输入城市进行查询" required>
		<button type="submit"> 查询</button>
		<div id="allmap" style="width:500px;height:450px;align:center"></div>
	
	</form>
	<div style="width:650px;margin:auto;">
		${name} - 今日天气<br>
		<table border="1" cellspacing="0" cellpadding="20" style="border: 2px solid #ca9def;">
			<tr>
				<th>日期</th>
				<th>高温</th>
				<th>风向</th>
				<th>低温</th>
				<th>风力</th>
				<th>气候</th>
			</tr>
			<tr>
				<td>${wheather.weekday}</td>
				<td>${wheather1[0].temperature_max}</td>
				<td>${wheather.night_wind_direction}</td>
				<td>${wheather1[0].temperature_min}</td>
				<td>${wheather.night_wind_power}</td>
				<td>${wheather.night_weather}</td>
			</tr>
		</table>
	</div>
	<div style="width:690px;margin:auto;">
		${name} - 未来几天天气：<table border="1" cellspacing="0" cellpadding="20" style="border: 2px solid #ca9def;">
			<tr>
				<th>日期</th>
				<th>高温</th>
				<th>风向</th>
				<th>低温</th>
				<th>风力</th>
				<th>气候</th>
			</tr>
			<c:forEach items="${wheathers}" var ="fbi" varStatus="loop">
				<tr>
					<td>${fbi.day}</td>
					<td>${wheathers2[loop.index].temperature_max}</td>
					<td>${fbi.night_wind_direction}</td>
					<td>${wheathers2[loop.index].temperature_min}</td>
					<td>${fbi.night_wind_power}</td>
					<td>${fbi.night_weather}</td>
				</tr>
			</c:forEach>
		</table>
		</div>
	
	<script type="text/javascript">
	 var map = new BMap.Map("allmap");          // 创建地图实例  
	var point = new BMap.Point("${pointX}","${pointY}");  // 创建点坐标  
	map.centerAndZoom("${name}", 13);                 // 初始化地图，设置中心点坐标和地图级别
	map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
	map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
	map.setDefaultCursor("url('bird.cur')");   //设置地图默认的鼠标指针样式 
	</script>
	
</body>
</html>
<!-- <script type="text/javascript">
 // 百度地图API功能
	var map = new BMap.Map("allmap");    // 创建Map实例
	map.centerAndZoom(new BMap.Point(114.07, 22.62), 11);  // 初始化地图,设置中心点坐标和地图级别
	map.addControl(new BMap.MapTypeControl());   //添加地图类型控件
	map.setCurrentCity("${name}");          // 设置地图显示的城市 此项是必须设置的
	map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放 
	</script> -->

